\subsection{Modules}
In this course, a \emph{ring} is taken to mean a commutative unital ring \( R \).
We do however allow for one noncommutative exception, the endomorphism ring \( \End(M) \) of an abelian group \( M \).
This is a ring where composition is the multiplication operation.
\begin{definition}
    An \( R \)-module is an abelian group \( M \) with a fixed ring homomorphism \( \rho : R \to \End(M) \).
    If \( r \in R \) and \( m \in M \), we define \( r \cdot m = \rho(r)(m) \).
\end{definition}
\begin{remark}
    Note that as \( \rho(r) \) is a group homomorphism,
    \[ r(m_1 + m_2) = \rho(r)(m_1 + m_2) = \rho(r)(m_1) + \rho(r)(m_2) = r \cdot m_1 + r \cdot m_2 \]
    Also, as \( \rho \) is a ring homomorphism,
    \[ (r_1 + r_2)m = \rho(r_1 + r_2)(m) = (\rho(r_1) + \rho(r_2))m = r_1 \cdot m + r_2 \cdot m \]
\end{remark}
\begin{example}
    \begin{enumerate}
        \item Let \( k \) be a field.
        Then a \( k \)-module is a \( k \)-vector space.
        \item Every abelian group \( M \) is a \( \mathbb Z \)-module in a unique way, because the morphism \( \mathbb Z \to \End M \) must map \( 1 \) to \( \id \).
        \item Every ring \( R \) is an \( R \)-module, by taking \( \rho(r) = r_0 \mapsto r_0 r \).
    \end{enumerate}
\end{example}
\begin{definition}
    The \emph{direct product} of abelian groups \( (M_i)_{i \in I} \) is the set of \( I \)-tuples \( (a_i)_{i \in I} \) where \( a_i \in M_i \), with elementwise addition as the group operation.
\end{definition}
\begin{definition}
    The \emph{direct sum} of abelian groups \( (M_i)_{i \in I} \) is the set of \( I \)-tuples \( (a_i)_{i \in I} \) where \( a_i \in M_i \) and all but finitely many of the \( a_i \) are zero, again with elementwise addition as the group operation.
\end{definition}
Direct products are written \( \prod_{i \in I} M_i \), and direct sums are written \( \bigoplus_{i \in I} M_i \).
These constructions coincide if the index set \( I \) is finite.
Direct products and direct sums of \( R \)-modules are also \( R \)-modules.

The universal property of the direct sum states that each collection of module homomorphisms \( \varphi_i : M_i \to R \) can be combined into a unique homomorphism \( \varphi : \bigoplus_{i \in I} M_i \to R \).
Similarly, the universal property of the direct product states that each collection of module homomorphisms \( \varphi_i : R \to M_i \) can be combined into a unique homomorphism \( \varphi : R \to \prod_{i \in I} M_i \).

\subsection{Noetherian and Artinian modules}
\begin{definition}
    An \( R \)-module \( M \) is \emph{Noetherian} if one of the following conditions holds.
    \begin{enumerate}
        \item Every ascending chain of submodules \( M_0 \subseteq M_1 \subseteq \cdots \) inside \( M \) stabilises.
        That is, for some \( k \), every \( j \in \mathbb N \) has \( M_{k+j} = M_k \).
        \item Every nonempty set \( \Sigma \) of submodules of \( M \) has a maximal element.
    \end{enumerate}
\end{definition}
\begin{lemma}
    The two conditions above are equivalent.
\end{lemma}
\begin{proof}
    \emph{(i) implies (ii).}
    Let \( \Sigma \) be a nonempty set of submodules of \( M \).
    If it has no maximal element, then for each \( M' \in \Sigma \) there exists \( M'' \in \Sigma \) with \( M' \subsetneq M'' \).
    We can then use the axiom of choice to pick a sequence \( M_0 \subsetneq M_1 \subsetneq M_2 \subsetneq \cdots \) of elements in \( \Sigma \).
    This contradicts (i).

    \emph{(ii) implies (i).}
    Let \( M_0 \subseteq M_1 \subseteq \cdots \) be an ascending chain of submodules in \( M \).
    Then let \( \Sigma = \qty{M_0, M_1, \dots} \).
    This has a maximal element \( M_k \) by (ii).
    Then for all \( j \in \mathbb N \), \( M_{k+j} = M_k \) as required.
\end{proof}
\begin{definition}
    \( M \) is \emph{Artinian} if one of the following conditions holds.
    \begin{enumerate}
        \item Every descending chain of submodules \( M_0 \supseteq M_1 \supseteq \cdots \) inside \( M \) stabilises.
        \item Every nonempty set \( \Sigma \) of submodules of \( M \) has a minimal element.
    \end{enumerate}
\end{definition}
Again, both conditions are equivalent.
\begin{lemma}
    An \( R \)-module \( M \) is Noetherian if and only if every submodule of \( M \) is finitely generated.
\end{lemma}
\begin{proof}
    Suppose \( M \) is Noetherian, and let \( N \subseteq M \) be a submodule.
    Pick \( m_1 \in N \), and consider the submodule \( M_1 \subseteq N \) generated by \( m_1 \).
    If \( M_1 = N \), then we are done.
    Otherwise, pick \( m_2 \in M_1 \setminus N \), and consider \( M_2 \subseteq N \) generated by \( m_2 \).
    This construction will always terminate, as if it did not, we would have constructed an infinite strictly ascending chain of submodules of \( M \), contradicting that \( M \) is Noetherian.

    Now suppose every submodule of \( M \) is finitely generated, and let \( M_0 \subseteq M_1 \subseteq \cdots \) be an ascending chain of submodules of \( M \).
    Let \( N = \bigcup_{i = 0}^\infty M_i \); this is a submodule of \( M \) as the \( M_i \) form a chain.
    Then \( N \) is finitely generated, say, by generators \( m_1, \dots, m_k \in N \).
    As the \( M_i \) form a chain increasing to \( N \), there exists \( n \) such that \( m_1, \dots, m_k \in M_n \).
    In particular, \( N \subseteq M_n \subseteq N \), so \( M_n = N \).
    Thus the chain stabilises.
\end{proof}
Note that every Noetherian module is finitely generated.
Let \( R = \mathbb Z[T_1, T_2, \dots] \), and let \( M = R \) as an \( R \)-module.
\( M \) is generated by \( 1_R \), so in particular it is finitely generated.
But it has a submodule \( \langle T_1, T_2, \dots \rangle \) that is not finitely generated.
So in the above lemma we indeed must check every submodule.
\begin{definition}
    A ring \( R \) is Noetherian (respectively Artinian) if \( R \) is Noetherian (resp.\ Artinian) as an \( R \)-module.
\end{definition}
\begin{example}
    \begin{enumerate}
        \item \( \mathbb Z \) over itself is a Noetherian module as it is a principal ideal domain, but it is not an Artinian module because we can take the chain \( (2) \supsetneq (4) \supsetneq (8) \supsetneq \cdots \).
        \item \( \mathbb Z \) is similarly a Noetherian ring but not an Artinian ring by unfolding the definition and using (i).
        \item \( \faktor{\mathbb Z\qty[\frac{1}{2}]\,}{\mathbb Z} \) is an Artinian module but not a Noetherian module.
        \item In fact, a ring \( R \) is Artinian if and only if \( R \) is Noetherian and \( R \) has \emph{Krull dimension} 0.
    \end{enumerate}
\end{example}

\subsection{Exact sequences}
\begin{definition}
    A sequence
    \[\begin{tikzcd}
        \cdots & {M_{i-1}} & {M_i} & {M_{i+1}} & \cdots
        \arrow[from=1-1, to=1-2]
        \arrow["{f_i}", from=1-2, to=1-3]
        \arrow["{f_{i+1}}", from=1-3, to=1-4]
        \arrow[from=1-4, to=1-5]
    \end{tikzcd}\]
    is \emph{exact} if the image of \( f_i \) is equal to the kernel of \( f_{i+1} \) for each \( i \), where the \( M_i \) are modules and the \( f_i \) are module homorphisms.
\end{definition}
\begin{definition}
    A \emph{short exact sequence} is an exact sequence of the form
    \[\begin{tikzcd}
        0 & {M'} & M & {M''} & 0
        \arrow[from=1-1, to=1-2]
        \arrow["{\text{injective}}", from=1-2, to=1-3]
        \arrow["{\text{surjective}}", from=1-3, to=1-4]
        \arrow[from=1-4, to=1-5]
    \end{tikzcd}\]
    In this situation, \( M'' \simeq \faktor{M}{i(M')} \).
    This is a way to encode \( M'' \) as a quotient by a submodule.
\end{definition}
\begin{lemma}
    Let
    \[\begin{tikzcd}
        0 & N & M & L & 0
        \arrow[from=1-1, to=1-2]
        \arrow["\iota", from=1-2, to=1-3]
        \arrow["\varphi", from=1-3, to=1-4]
        \arrow[from=1-4, to=1-5]
    \end{tikzcd}\]
    be a short exact sequence of \( R \)-modules.
    Then \( M \) is Noetherian (resp.\ Artinian) if and only if both \( N \) and \( L \) are Noetherian (resp.\ Artinian).
\end{lemma}
\begin{proof}
    We show the statement for Noetherian modules.

    Suppose \( M \) is Noetherian.
    If \( N_0 \subseteq N_1 \subseteq \cdots \) is an ascending chain of submodules inside \( N \), then by taking images,
    \[ \iota(N_0) \subseteq \iota(N_1) \subseteq \cdots \]
    is also naturally an ascending chain of submodules inside \( M \), so it stabilises.
    As \( \iota \) is injective, the original sequence also stabilises.
    Hence \( N \) is Noetherian.

    If \( L_0 \subseteq L_1 \subseteq \cdots \) is an ascending chain of submodules inside \( L \), then by taking preimages,
    \[ \varphi^{-1}(L_0) \subseteq \varphi^{-1}(L_1) \subseteq \cdots \]
    is an ascending chain of submodules inside \( M \), where
    \[ \varphi^{-1}(L_i) = \qty{m \in M \mid \varphi(m) \in L_i} \]
    So this chain stabilises at \( \varphi^{-1}(L_k) \).
    But as \( \varphi \) is surjective, \( \varphi(\varphi^{-1}(L_i)) = L_i \), so the original sequence must stabilise at \( L_k \).

    Now suppose \( N \) and \( L \) are Noetherian, and let \( M_0 \subseteq M_1 \subseteq \cdots \) be an ascending chain of submodules in \( M \).
    Then
    \[ \iota^{-1}(M_0) \subseteq \iota^{-1}(M_1) \subseteq \cdots \]
    is an ascending chain of submodules in \( N \), so stabilises at \( \iota^{-1}(M_{k_N}) \) for some \( k_N \).
    Similarly,
    \[ \varphi(M_0) \subseteq \varphi(M_1) \subseteq \cdots \]
    is an ascending chain of submodules in \( L \), so stabilises at \( \varphi{-1}(M_{k_L}) \) for some \( k_L \).
    Take \( k \geq k_N, k_L \), and let \( j \geq 0 \).
    We show \( M_{k + j} \subseteq M_k \), proving that the sequence stabilises.

    Let \( m \in M_{k+j} \).
    As \( \varphi(M_{k+j}) = \varphi(M_k) \), there exists \( m' \in M_k \) such that \( \varphi(m) = \varphi(m') \).
    Then \( \varphi(m - m') = 0 \), so by exactness, \( m - m' \) is in the image of \( \iota \), say, \( \iota(x) = m - m' \).
    Since \( m - m' \in M_{k+j} \), we must have \( x \in \iota^{-1}(M_{k+j}) \).
    But then \( x \in \iota^{-1}(M_k) \), so \( \iota(x) = m - m' \in M_k \).
    Hence \( m \in M_k \).
\end{proof}
\begin{corollary}
    If \( M_1, \dots, M_n \) are Noetherian (resp.\ Artinian) modules, then so is \( M_1 \oplus \dots \oplus M_n \).
\end{corollary}
\begin{proof}
    Consider the sequence
    \[\begin{tikzcd}
        0 & {M_1} & {M_1 \oplus M_2} & {M_2} & 0
        \arrow[from=1-1, to=1-2]
        \arrow["\iota", from=1-2, to=1-3]
        \arrow["\pi", from=1-3, to=1-4]
        \arrow[from=1-4, to=1-5]
    \end{tikzcd}\]
    where \( \iota(x) = (x, 0) \) and \( \pi(x, y) = y \).
    This is exact, so \( M_1 \oplus M_2 \) is Noetherian.
    We then proceed by induction on \( n \).
\end{proof}
\begin{proposition}
    For a Noetherian (resp.\ Artinian) ring \( R \), every finitely generated \( R \)-module is Noetherian (resp.\ Artinian).
\end{proposition}
\begin{proof}
    \( M \) is finitely generated if and only if there is a surjective module homomorphism \( \varphi : R^n \to M \) for some \( n \geq 0 \).
    That is, \( M \) is a quotient of \( R^n \).
    The fact that \( R^n \) is Noetherian (or Artinian) passes through to its quotients.
\end{proof}

\subsection{Algebras}
\begin{definition}
    An \emph{\( R \)-algebra} is a ring \( A \) together with a fixed ring homomorphism \( \rho : R \to A \).
\end{definition}
\begin{example}
    The map \( k \to k[T_1, \dots, T_n] \) makes the polynomial ring \( k[T_1, \dots, T_n] \) a \( k \)-algebra.
\end{example}
We will write \( ra = \rho(r) a \).
Note that \( \rho(r) = \rho(r) \cdot 1_A = r \cdot 1_A \), so we can write \( r \cdot 1_A \) for \( \rho(r) \).
\begin{remark}
    Every \( R \)-algebra is an \( R \)-module.
\end{remark}
\begin{example}
    As a \( k \)-module, \( k[T_1, \dots, T_n] \) is infinite-dimensional.
    As a \( k \)-algebra, \( k[T_1, \dots, T_n] \) is generated by the \( n \) elements \( T_1, \dots, T_n \).
\end{example}
\begin{definition}
    \( \varphi : A \to B \) is an \emph{\( R \)-algebra homomorphism} if \( \varphi \) is a ring homomorphism and preserves all elements of \( R \).
    That is, \( \varphi(r \cdot 1_A) = r \cdot 1_B \).
\end{definition}
An \( R \)-algebra \( A \) is finitely generated if and only if there is some \( n \geq 0 \) and a surjective algebra homomorphism \( R[T_1, \dots, T_n] \to A \).
\begin{theorem}[Hilbert's basis theorem]
    Every finitely generated algebra \( A \) over a Noetherian ring \( R \) is Noetherian.
\end{theorem}
For example, the polynomial algebra over a field is Noetherian.
\begin{proof}
    It suffices to prove this for a polynomial ring, as every finitely generated algebra is a quotient of a polynomial ring.
    It further suffices to prove this for a univariate polynomial ring \( A = R[T] \) by induction.
    Let \( \mathfrak a \) be an ideal of \( R[T] \); we need to show that \( \mathfrak a \) is finitely generated.
    For each \( i \geq 0 \), define
    \[ \mathfrak a(i) = \qty{c_0 \mid c_0 T^i + \dots + c_i T^0 \in \mathfrak a} \]
    Thus \( \mathfrak a(i) \) is the set of leading coefficients of polynomials of degree \( i \) that lie in \( \mathfrak a \).
    Each \( \mathfrak a(i) \) is an ideal in \( R \), and \( \mathfrak a(i) \subseteq \mathfrak a(i+1) \) by multiplying by \( T \).
    As \( R \) is Noetherian, each \( \mathfrak a(i) \) is a finitely generated ideal, and this ascending chain stabilises at \( \mathfrak a(m) \), say.
    Let
    \[ \mathfrak a(i) = (b_{i,1}, \dots, b_{i,n_i}) \]
    We can choose \( f_{i,j} \) of degree \( i \) with leading coefficient \( b_{i,j} \).
    Define the ideal
    \[ \mathfrak b = (f_{i,j})_{i \leq m, j \leq n_i} \]
    Note that \( \mathfrak b \) is finitely generated.
    Defining \( \mathfrak b(i) \) in the same way as \( \mathfrak a(i) \), we have
    \[ \forall i,\, \mathfrak a(i) = \mathfrak b(i) \]
    By construction, \( \mathfrak b \subseteq \mathfrak a \); we claim that the reverse inclusion holds, then the proof will be complete.
    Suppose that \( \mathfrak a \nsubseteq \mathfrak b \), and take \( f \in \mathfrak a \setminus \mathfrak b \) of minimal degree \( i \).
    As \( \mathfrak a(i) = \mathfrak b(i) \), there is a polynomial \( g \) in \( \mathfrak b \) of degree \( i \) that has the same leading coefficient.
    Then \( f - g \) has degree less than \( i \), and lies in \( \mathfrak a \).
    But then by minimality, \( f - g \in \mathfrak b \), giving \( f \in \mathfrak b \).
\end{proof}
Therefore, if \( S \subseteq \faktor{R[T_1, \dots, T_n]}{I} \) where \( R \) is Noetherian, then \( (S) = (S_0) \) where \( S_0 \subseteq S \) is finite.
